package com.szrt.java.day20170113.ch01;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class Student {


	private  int card;
	
	private String name;
	
	private String phone;
	
	
	public Student(){
		System.out.println("反射或者框架底层调用的都是无参的构造方法...");
	}
	
	

	public Student(int card, String name, String phone) {
		this.card = card;
		this.name = name;
		this.phone = phone;
	}

	public int getCard() {
		return card;
	}

	public void setCard(int card) {
		this.card = card;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	
	
	public void sang(){
		System.out.println("国歌....");
	}
	
	
	void xx00(){
		
	}
	
	
	private int add(int x , int y){
		int sum  = x+y;
		return sum;
	}
	
	/**
	 * 1.23 + 3.456 = 4.686 = 4.69
	 * @param x
	 * @param y
	 * @return
	 */
	private double add(double x , double y){
		
		BigDecimal  xx = new BigDecimal(x);
		BigDecimal  yy = new BigDecimal(y);
		BigDecimal jieguo =xx.add(yy).setScale(2, RoundingMode.HALF_UP);
		double xyz= jieguo.doubleValue();
		return xyz;
	}
	
	private void findGF(){
		System.out.println("找女朋友...");
	}



	@Override
	public String toString() {
		return "Student [card=" + card + ", name=" + name + ", phone=" + phone + "]";
	}
	
	
	
}
